package com.hongying.producer;

import com.hongying.bean.Simple;
import com.hongying.constant.RabbitMqConstant;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;


@Component
public class SimpleProducer {

    @Autowired
    private RabbitTemplate rabbitTemplate;

    public void sendOrderMessage(Simple simple){
        rabbitTemplate.convertAndSend(RabbitMqConstant.HANDLER_OBJECT_QUEUE_NAME,simple);
    }


}
